class B{
    public int func(){
        System.out.println("B");
        return 0;
    }
}

class D extends B{
    @Override
    public int func() {
        System.out.println("D");
        return 0;
    }
}


class C{
}

public class Test {
    public static void main(String[] args) {
        B a = new B();
        B b = new D();
        a.func();
        b.func();
    }
}






